package com.ruoyi.house.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.YjzAuditMapper;
import com.ruoyi.house.domain.YjzAudit;
import com.ruoyi.house.service.IYjzAuditService;

/**
 * 房源审核Service业务层处理
 *
 * @author 码道可道
 * @date 2025-07-14
 */
@Service
public class YjzAuditServiceImpl extends ServiceImpl<YjzAuditMapper, YjzAudit> implements IYjzAuditService {
    @Autowired
    private YjzAuditMapper yjzAuditMapper;

    /**
     * 查询房源审核
     *
     * @param id 房源审核主键
     * @return 房源审核
     */
    @Override
    public YjzAudit selectYjzAuditById(Long id) {
        return yjzAuditMapper.selectYjzAuditById(id);
    }

    /**
     * 查询房源审核列表
     *
     * @param yjzAudit 房源审核
     * @return 房源审核
     */
    @Override
    public List<YjzAudit> selectYjzAuditList(YjzAudit yjzAudit) {
        return yjzAuditMapper.selectYjzAuditList(yjzAudit);
    }

    /**
     * 新增房源审核
     *
     * @param yjzAudit 房源审核
     * @return 结果
     */
    @Override
    public int insertYjzAudit(YjzAudit yjzAudit) {
                yjzAudit.setCreateTime(DateUtils.getNowDate());
            return yjzAuditMapper.insertYjzAudit(yjzAudit);
    }

    /**
     * 修改房源审核
     *
     * @param yjzAudit 房源审核
     * @return 结果
     */
    @Override
    public int updateYjzAudit(YjzAudit yjzAudit) {
                yjzAudit.setUpdateTime(DateUtils.getNowDate());
        return yjzAuditMapper.updateYjzAudit(yjzAudit);
    }

    /**
     * 批量删除房源审核
     *
     * @param ids 需要删除的房源审核主键
     * @return 结果
     */
    @Override
    public int deleteYjzAuditByIds(Long[] ids) {
        return yjzAuditMapper.deleteYjzAuditByIds(ids);
    }

    /**
     * 删除房源审核信息
     *
     * @param id 房源审核主键
     * @return 结果
     */
    @Override
    public int deleteYjzAuditById(Long id) {
        return yjzAuditMapper.deleteYjzAuditById(id);
    }
}